home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2002 #11
/
Amiga Plus CD - 2002 - No. 11.iso
/
amigaoscd
/
amigapluscd
/
AP-Website
/
news
/
admin
/
add_news.php
< prev
next >
Wrap
PHP Script
|
2002-01-27
|
900b
|
33 lines
<?php
$server = "db04.puretec.de";
$db = "db24905524";
$login = "p343302";
$pass = "90f42902";
$dbwww = mysql_connect($server,$login,$pass);
mysql_select_db($db,$dbwww);
if($title==""||$newstext=="")
$error = "Titel und Text müssen mindestens ausgefüllt sein!";
if($target=="")
$target = "_blank";
$timestamp = time();
$query = "insert into amigaplusnews_content (timestamp, title, link, source, text, category, author, target) values ('$timestamp','$title','$link','$source','$newstext','$category','$author','$target')";
if(!$error)
{
mysql_query($query,$dbwww);
header("Location: index.php");
}
?>
<html>
<head><title>Fehler</title></head>
<body bgcolor="#66CCFF" text="#000000">
<?php echo $error ?><br>(Weiter mit dem Back-Button des Browsers)
</body>
</html>